<%@ page contentType="text/html;charset=UTF-8" pageEncoding="UTF-8" %>
<%@ page import="com.yaodian100.core.common.utils.ServerValue" %>
<%@ taglib prefix="s" uri="/struts-tags" %>
<%@ include file="/taglibs.jsp" %>

<c-rt:set var="midContextPath" value='<%=ServerValue.getMidContextPath()%>' />

<!-- 验证 -->
<script type="text/javascript" charset="UTF-8" src="<%=ServerValue.getMidContextPath()%>/js/formValidator_min.js" charset="UTF-8"></script>
<script type="text/javascript" charset="UTF-8" src="<%=ServerValue.getMidContextPath()%>/js/formValidator.js" charset="UTF-8"></script>
<script type="text/javascript" charset="UTF-8" src="<%=ServerValue.getMidContextPath()%>/js/formValidatorRegex.js" charset="UTF-8"></script>
<!-- 数字验证 -->
<script type="text/javascript" charset="UTF-8" src="<%=ServerValue.getMidContextPath()%>/js/jquery.alphanumeric.js"></script>
<!-- 月历 -->
<script type="text/javascript" charset="UTF-8" src="<%=ServerValue.getMidContextPath()%>/js/jquery.datepick.js"></script>
<script type="text/javascript" charset="UTF-8" src="<%=ServerValue.getMidContextPath()%>/js/jquery.datepick-zh-CN.js"></script>
<link rel="stylesheet" type="text/css" href="<%=ServerValue.getMidContextPath()%>/css/smoothness.datepick.css" />
<!-- 時間 -->	
<script type="text/javascript" src="<%=ServerValue.getMidContextPath()%>/js/jquery.timePicker.js"></script>
<link rel="stylesheet" type="text/css" href="<%=ServerValue.getMidContextPath()%>/css/timePicker.css" />

<script language="javascript">
	$().ready(function(){
		$('#tuangouStartDate').datepick({minDate: new Date(${minDate}), showOn: 'both',numberOfMonths:2,
	    	buttonImageOnly: true, buttonImage: '<%=ServerValue.getMidContextPath()%>/images/calendar.gif',dateFormat:"yy-mm-dd",yearRange: '-50:+50'});
		$('#tuangouEndDate').datepick({minDate: new Date(), showOn: 'both', numberOfMonths:2,
	    	buttonImageOnly: true, beforeShow:customRange, buttonImage: '<%=ServerValue.getMidContextPath()%>/images/calendar.gif',dateFormat:"yy-mm-dd",yearRange: '-50:+50'});
		function customRange(){
			var startDt = $('#tuangouStartDate').val(); //起始日
			var endDt = new Date(parseInt(startDt.substring(0,4),10),parseInt(startDt.substring(5,7),10)-1,parseInt(startDt.substring(8,10),10)); //結束日
			return {minDate:endDt}; 
		}
		
		$("#tuangouStartTime").timePicker({step:60, startTime:"00:00", endTime:"23:00"});
		$("#tuangouEndTime").timePicker({step:60, startTime:"00:59", endTime:"23:59"});
		
		$("#tuangouLowestOrderQty").numeric();
		$("#shelfTuangouPrice").numeric({allow:"."});
		
		if ( $("#shelfTuangouPrice").val() == "0" ){
			$("#rate").text(round2places(($("#shelfTuangouPrice").val() - "${product.productCost}")/1*100)+"%");
		}else{
			if ( "" != "${shelfTuangou.price}" )
				$("#rate").text(round2places(("${shelfTuangou.price}" - "${product.productCost}")/"${shelfTuangou.price}"*100)+"%");
			if ( $("#shelfTuangouPrice").val() != "" )
				$("#rate").text(round2places(($("#shelfTuangouPrice").val() - "${product.productCost}")/$("#shelfTuangouPrice").val()*100)+"%");
		}
		$("#shelfTuangouPrice").blur(function(){
			if ( $("#shelfTuangouPrice").val() == "0" ){
				$("#rate").text(round2places(($("#shelfTuangouPrice").val() - "${product.productCost}")/1*100)+"%");
			}else{
				$("#rate").text(round2places(($("#shelfTuangouPrice").val() - $("#productCost").val())/$("#shelfTuangouPrice").val()*100)+"%");
			}
			//查詢成本资讯-毛利率
			$("td[id*='efDt_']").each(function(index){
				$("#tdRate_"+index).text(round2places(($("#shelfTuangouPrice").val() - $("#unPrc_"+index).text())/$("#shelfTuangouPrice").val()*100)+"%"); 
			});
		});

		<c-rt:if test="${not empty shelfTuangou.tuangouId}">
		 	if ($("#tuangouStartDate").val() != "") {
				$("#tuangouStartDate").datepick('disable');
			}
			if ($("#tuangouStartTime").val() != "") {
				$("#tuangouStartTime").attr("disabled", true);
			}
		</c-rt:if>

		//查詢成本
		$("#queryCost").click(function(){
			if($("#tuangouStartDate").val()=='' || $("#tuangouStartTime").val()==''){
				alert("请选择日期&时间");
			}else{
				var sEndDate='';
				if($("#tuangouEndDate").val()==''){
					sEndDate='2055-12-31';
				}else{
					sEndDate=$("#tuangouEndDate").val();
				}
				
				var sTendend='';
				if($("#tuangouEndTime").val()==''){
					sTendend='00:00';
				}else{
					sTendend=$("#tuangouEndTime").val();
				}
				
				$.post("<%=ServerValue.getMidContextPath()%>/shelf2/getJsonCheckTuangouCost.do",
					{productId:$("#productId").val(),tuangouStartDate:$("#tuangouStartDate").val(),tuangouStartTime:$("#tuangouStartTime").val(),tuangouEndDate:sEndDate,tuangouEndTime:sTendend},
					//查询后台成本
					function(jsonDatas){
						if(null!=jsonDatas){
							$('#divCost').html("");
							for(j=0; j<jsonDatas.length;j++){
								$('#divCost').append("<tr><td id=efDt_"+j+">"+jsonDatas[j].effectiveDateString+"</td><td id=unPrc_"+j+">"+jsonDatas[j].unitPrice+"</td><td id=tdRate_"+j+">"+"</td></tr>");
							}
						}else{
							alert("无成本资讯");
							$('#divCost').html("");
						}
					},
					"json"
				);
			}
		});
		
		$("input[name='chkMemberLimit']").click(function(){
			if($("#chkMemberLimit").attr('checked')){
				$("#memberLimit").val('Y');
			}else{
				$("#memberLimit").val('N');
			}
		});
		
		//申请
		$("#submitBtn").click(function(){
			if(validate_data()){
				if($("#cat_rate").text()=='' || parseFloat($("#rate").text().replace("%","")) < parseFloat($("#cat_rate").text().replace("%",""))){
					if(confirm("实际毛利率小于分类毛利率限制,确定要储存吗?")){
						$("#shelfTuangouStatus").val("SHF000");
						$("#shelfTuangouForm").submit();
					}
				}else{
					$("#shelfTuangouStatus").val("SHF500");
					$("#shelfTuangouForm").submit();
				}
			}
		});
		
		//不通過審核
		$("#approveCancelBtn").click(function(){
			if(""==$("#approveTuangouFailReason").val()){
				alert("请输入审核失败原因");
				return false;
			}
			
			$("#shelfTuangouForm").attr("action","saveApproveTuangou.do");
			$("#shelfTuangouStatus").val("SHF600");
			$("#shelfTuangouForm").submit();
		});
		
		//通過審核
		$("#approveOKBtn").click(function(){
			if($("#cat_rate").text()=='' || parseFloat($("#rate").text().replace("%","")) < parseFloat($("#cat_rate").text().replace("%",""))){
				if(confirm("实际毛利率小于分类毛利率限制,确定要储存吗?")){
					toSaveApproveTuangou();
				}
			}else{
				toSaveApproveTuangou();
			}
		});
	});
	
	function toSaveApproveTuangou(){
		$("#shelfTuangouStatus").val("SHF500");
		$("#shelfTuangouForm").attr("action","saveApproveTuangou.do");
		$("#shelfTuangouForm").submit();
	}
	
	function validate_data(){
		if($("#tuangouPromoteName").val() != ""){
			if(parseInt(GetCharLength($("#tuangouPromoteName").val()),10)>400){
				alert("促销小标字数限制:200个中文字");
				return false;
			}		
		}
		
		if($("#tuangouStartDate").val() == ""){
			alert("请输入团购活动起始日期");
			return false;
		}
		
		if($("#tuangouStartTime").val() == ""){
			alert("请输入团购活动起始時間");
			return false;
		}
		
		if($("#tuangouEndDate").val() == ""){
			alert("请输入团购活动結束日期");
			return false;
		}
		
		if($("#tuangouEndTime").val() == ""){
			alert("请输入团购活动結束時間");
			return false;
		}
		
		if(!dateDiff($("#tuangouStartDate").val(),$("#tuangouStartTime").val(),$("#tuangouEndDate").val(),$("#tuangouEndTime").val())){
			alert("团购活动結束日期不可大于团购活动起始日期");
			return false;
		}
		
		if(!checkTenDay($("#tuangouStartDate").val(),$("#tuangouStartTime").val(),$("#tuangouEndDate").val(),$("#tuangouEndTime").val())){
			alert("团购活动天数不可大于10天");
			return false;
		}
		
		if($("#shelfTuangouPrice").val()==""){
			alert("请输入团购售价");
			return false;
		}
		
		if(isNaN($("#shelfTuangouPrice").val())){
			alert("团购售价输入错误");
			return false;
		}
		
		if($("#tuangouLowestOrderQty").val()==""){
			alert("请输入活动最低订购人数");
			return false;
		}
		
		var isTuangouPrize=false;
	<yaodian100:checkPermission permissions="ROLE_TUANGOU_PRIZE">
		isTuangouPrize=true;
	</yaodian100:checkPermission>
	if(isTuangouPrize==false && $("#shelfTuangouPrice").val()==0){
		alert("无团购抽奖活动设定权限");
		return false;
	}
	
	if($("#shelfTuangouPrice").val()==0 && $("#chkMemberLimit").attr("checked")==false){
		alert("抽奖活动必须限单个会员限购一次");
		return false;
	}
		
	<c-rt:if test="${not empty shelfTuangou.tuangouId}">
		if(($("#tuangouStartDate").val()!=$("#checkTuangouStartDate").val()) && $("#checkTuangouStartDate").val()!=''){
			alert("团购活动起始日期不可更改");
			return false;
		}
		
		if(($("#tuangouStartTime").val()!=$("#checkTuangouStartTime").val()) && $("#checkTuangouStartTime").val()!=''){
			alert("团购活动起始时间不可更改");
			return false;
		}
	</c-rt:if>
	
		return true;
	}
	
	//取到小数点第二位
	function round2places(numToRound){
		var result;
		result=numToRound*100;
		result=Math.round(result);
		result=result/100;
		
		return result;
	}
	
	function GetCharLength(str){
		var iLength=0;
		for(var i=0;i<str.length;i++){
			if(str.charCodeAt(i)>255){
				iLength+=2;
			}else{
				iLength+=1;
			}
		}
		
		return iLength;
	}

	//日期判断,计算天数差的函数
	function dateDiff(sDate1,sTime1,sDate2,sTime2){
		var startDate=new Date(sDate1.split("-")[0],eval(sDate1.split("-")[1])-1,sDate1.split("-")[2],sTime1.split(":")[0],sTime1.split(":")[1],00);
		var endDate=new Date(sDate2.split("-")[0],eval(sDate2.split("-")[1])-1,sDate2.split("-")[2],sTime2.split(":")[0],sTime2.split(":")[1],00);
		if(startDate>=endDate){
			return false;
		}else{
			return true;
		}
	}
	
	function checkTenDay(sDate1,sTime1,sDate2,sTime2){
		var startDate=new Date(sDate1.split("-")[0],eval(sDate1.split("-")[1])-1,sDate1.split("-")[2],sTime1.split(":")[0],sTime1.split(":")[1],00);
		var endDate=new Date(sDate2.split("-")[0],eval(sDate2.split("-")[1])-1,sDate2.split("-")[2],sTime2.split(":")[0],sTime2.split(":")[1],00);
		
		if((endDate.getTime()-startDate.getTime())>864000000){
			return false;
		}else{
			return true;
		}
	}
</script>

<c-rt:choose>
	<c-rt:when test="${approveTuangou eq 'Y'}">
		<h1>团购上架管理  - 审核</h1>
	</c-rt:when>
	<c-rt:otherwise>
		<h1>团购上架管理  - 编辑</h1>
	</c-rt:otherwise>
</c-rt:choose>

<s:if test="hasActionErrors()">
	<s:actionerror cssClass="msg rn"/><p />
</s:if>
<s:if test="hasActionMessages()">
	<s:actionmessage cssClass="msg rn"/><p />
</s:if>
<s:if test="hasFieldErrors()">
	<s:fielderror cssClass="msg rn"/><p />
</s:if>

<div class="f-link">
	<yaodian100:checkPermission permissions="OTHER_TUANGOUMANAGER">
		<a href="<%=ServerValue.getMidContextPath()%>/shelf2/searchTuangouApprove.do">回团购审核列表页</a>
		<a href="<%=ServerValue.getMidContextPath()%>/shelf2/listTuangou.do">回团购上下架列表页</a>
	</yaodian100:checkPermission>
	<a href="<%=ServerValue.getMidContextPath()%>/shelf2/list.do?productId=${productId}">回上下架列表页</a>
	<a href="<%=ServerValue.getMidContextPath()%>/product/list.do">回商品列表页</a>
</div>

<c-rt:if test="${not empty product.productId}">
	<jsp:include page="/WEB-INF/jsp/product/commonMenu2.jsp"/>
</c-rt:if>

<s:form action="saveTuangou.do" method="post" id="shelfTuangouForm">
	<table class="tb-data" width="100%">	
		<tr>
			<th>商品名称<br />(商品编号)</th>
			<td>${product.productName}<br/>${product.productId}</td>
			<th>上架状态</th>
			<td>${shelfTuangouStatusMenu.options[shelfTuangou.status].name}</td>
		</tr>
<c-rt:choose>
	<c-rt:when test="${approveTuangou eq 'Y'}">
		<tr>
			<th>促销小标</th>
			<td colspan="3">${shelfTuangou.promoteName}</td>
		</tr>
		<tr>
			<th>*活动起始日期时间</th>
			<td colspan="3"><fmt:formatDate value="${shelfTuangou.startDate}" pattern="yyyy-MM-dd HH:mm" /></td>
		</tr>
		<tr>
			<th>*活动结束日期时间</th>
			<td colspan="3"><fmt:formatDate value="${shelfTuangou.endDate}" pattern="yyyy-MM-dd HH:mm" /></td>
		</tr>
		<tr>
			<th>*团购售价</th>
			<td colspan="3">
				<fmt-rt:formatNumber pattern="######0.0" value="${shelfTuangou.price}" />
				<input type="hidden" name="shelfTuangouPrice" id="shelfTuangouPrice" size="10" value="${shelfTuangou.price}"/>
				<c-rt:set var="cost" value="${product.productCost}" />
				<input type="hidden" name="cost" id="cost" value="${cost}" />
				<span class="txt-rd">【※上架售价小数点1位数后无条件舍去】</span><br />
				<table class="tb-data" width="100%">
					<tr>
						<th>厂商建议售价</th>
						<th>提报耀点价</th>
						<th>商品成本</th>
						<th>分类毛利率限制</th>
						<th>实际毛利率</th>
					</tr>
					<tr>
						<td style="text-align:center;"><fmt-rt:formatNumber pattern="######0.0" value="${product.listPrice}" /></td>
						<td style="text-align:center;"><fmt-rt:formatNumber pattern="######0.0" value="${product.prpsShelfPrice}" /></td>
						<td style="text-align:center;"><fmt-rt:formatNumber pattern="######0.00" value="${product.productCost}" /></td>
						<td style="text-align:center;"><span id="cat_rate" class="txt-rd"><fmt-rt:formatNumber pattern="######0.0" value="${grossProfit}" /></span></td>
						<td style="text-align:center;"><span id="rate"></span></td>
					</tr>
				</table>
			</td>
		</tr>
		<tr>
			<th>活动最低订购人数</th>
			<td colspan="3">
				${shelfTuangou.lowestOrderQty}<span class="txt-rd">【0:表示不设定活动门槛】</span>
			</td>
		</tr>
		<tr>
			<th>订购数</th>
			<td colspan="3">
				${shelfTuangou.orderQty}(订购) - ${shelfTuangou.cancelQty}(取消) = ${shelfTuangou.orderQty-shelfTuangou.cancelQty}(实际订购)
			</td>
		</tr>
		<tr>
			<th>商品贩售限定</th>
			<td colspan="3">
				<input name="chkMemberLimit" type="checkbox" id="chkMemberLimit" disabled="disabled" <c:if test="${shelfTuangou.memberLimit eq 'Y'}">checked="checked"</c:if> />
				<input name="memberLimit" type="hidden" value="${shelfTuangou.memberLimit}" id="memberLimit" />
				单个会员限购一次
			</td>
		</tr>
		<tr>
			<th>销售</th>	
			<td colspan="3">
				<c:if test="${shelfTuangou.salesType eq '1'}">一般</c:if>
				<c:if test="${shelfTuangou.salesType eq '2'}">抽奖</c:if>
			</td>
		</tr>
		<tr>
			<th>备注</th>
			<td colspan="3">${shelfTuangou.memo}</td>
		</tr>
		<tr>
			<th>
				建立者<br />
				建立日期<br />
				修改者<br />
				修改日期
			</th>
			<td colspan="3">
				${shelfTuangou.createUser}<br />
				<fmt-rt:formatDate value="${shelfTuangou.createDate}" pattern="yyyy-MM-dd HH:mm:ss" /><br />
				${shelfTuangou.modifyUser}<br />
				<fmt-rt:formatDate value="${shelfTuangou.modifyDate}" pattern="yyyy-MM-dd HH:mm:ss" />
			</td>
		</tr>
		<tr>
			<th>审核人员</th>
			<td colspan="3">${loginUser}</td>
		</tr>
		<tr>
			<th>不同意原因</th>
			<td colspan="3">
				<input type="text" name="approveTuangouFailReason" id="approveTuangouFailReason" maxlength="255" size="100" />
			</td>
		</tr>
	</c-rt:when>
	<c-rt:otherwise>
		<tr>
			<th>促销小标</th>
			<td colspan="3">
				<input type="text" name="tuangouPromoteName" id="tuangouPromoteName" size="100" maxlength="200" value="${shelfTuangou.promoteName}" />
				<span class="txt-rd">【※限200个中文字】</span>
			</td>
		</tr>
		<tr>
			<th>*活动起始日期时间</th>
			<td colspan="3">
				<input type="text" name="tuangouStartDate" id="tuangouStartDate" size="20" value="<fmt:formatDate value="${shelfTuangou.startDate}" pattern="yyyy-MM-dd" />" <c:if test="${shelfTuangou.startDate ne ''}">readonly="readonly"</c:if> />
				<input type="text" name="tuangouStartTime" id="tuangouStartTime" size="10" value="<fmt:formatDate value="${shelfTuangou.startDate}" pattern="HH:mm" />" <c:if test="${shelfTuangou.startDate ne ''}">readonly="readonly"</c:if> />
				<input type="hidden" id="checkTuangouStartDate" size="20" value="<fmt:formatDate value="${shelfTuangou.startDate}" pattern="yyyy-MM-dd" />" />
				<input type="hidden" id="checkTuangouStartTime" size="10" value="<fmt:formatDate value="${shelfTuangou.startDate}" pattern="HH:mm" />" />
			</td>
		</tr>
		<tr>
			<th>*活动结束日期时间</th>
			<td colspan="3">
				<input type="text" name="tuangouEndDate" id="tuangouEndDate" size="20" value="<fmt:formatDate value="${shelfTuangou.endDate}" pattern="yyyy-MM-dd" />" />
				<input type="text" name="tuangouEndTime" id="tuangouEndTime" size="10" value="<fmt:formatDate value="${shelfTuangou.endDate}" pattern="HH:mm" />" />
				<span class="txt-rd">【※活动天数不可大于10天】</span><input type="button" id="queryCost" value="查询成本" />
			</td>
		</tr>
		<tr>
			<th>*团购售价</th>
			<td colspan="3">
				<input type="text" name="shelfTuangouPrice" id="shelfTuangouPrice" size="10" value="${shelfTuangou.price}" <c:if test="${shelfTuangou.orderQty > 0}">readonly="readonly"</c:if> />
				<span class="txt-rd">【※若金额0元即表示抽奖活动】</span><br /><br />
				<table  class="tb-data" width="100%">
					<tr>
						<th>厂商建议售价</th>
						<th>提报耀点价</th>
						<th>商品成本</th>
						<th>分类毛利率限制</th>
						<th>实际毛利率</th>
					</tr>
					<tr>
						<td style="text-align:center;"><fmt-rt:formatNumber pattern="######0.0" value="${product.listPrice}" /></td>
						<td style="text-align:center;"><fmt-rt:formatNumber pattern="######0.0" value="${product.prpsShelfPrice}" /></td>
						<td style="text-align:center;"><fmt-rt:formatNumber pattern="######0.00" value="${product.productCost}" /></td>
						<td style="text-align:center;"><span id="cat_rate" class="txt-rd"><fmt-rt:formatNumber pattern="######0.0" value="${grossProfit}" /></span></td>
						<td style="text-align:center;"><span id="rate"></span></td>
					</tr>
				</table>
			</td>
		</tr>
		<tr>
			<th>成本资讯</th>
			<td colspan="3">
				<table>
					<tr>
						<th>生效日</th><th>成本</th><th>毛利率</th>
					</tr>
					<tbody id="divCost"></tbody>
				</table>
			</td>
		</tr>
		<tr>
			<th>*排序设定</th>
			<td><s:select name="shelfTuangouSortSeq" list="shelfTuangouSortSeqMenu.options" listKey="key"  listValue="value.name" /></td>
			<th>*活动最低订购人数</th>
			<td><input type="text" name="tuangouLowestOrderQty" id="tuangouLowestOrderQty" size="10" value="${shelfTuangou.lowestOrderQty}" /></td>
		</tr>
		<tr>
			<th>商品贩售限定</th>
			<td colspan="3">
				<input name="chkMemberLimit" type="checkbox" id="chkMemberLimit" <c:if test="${shelfTuangou.memberLimit eq 'Y'}">checked="checked"</c:if> />
				<input name="memberLimit" type="hidden" value="${shelfTuangou.memberLimit}" id="memberLimit" />
				单个会员限购一次 <span class="txt-rd">【※储存后将于下一整点后生效】</span>
			</td>
		</tr>
		<tr>
			<th>订购数</th>
			<td colspan="3">
				${shelfTuangou.orderQty}(订购) - ${shelfTuangou.cancelQty}(取消) = ${shelfTuangou.orderQty-shelfTuangou.cancelQty}(实际订购)
			</td>
		</tr>
		<tr>
			<th>备注</th>
			<td colspan="3">
				<textarea name="shelfTuangouMemo" cols="80" rows="5">${shelfTuangou.memo}</textarea>
			</td>
		</tr>
	</c-rt:otherwise>
</c-rt:choose>
		<tr>
			<td colspan="4">
				<input type="hidden" name="tuangouId" id=tuangouId value="${shelfTuangou.tuangouId}" />
				<input type="hidden" name="productId" id="productId" value="${productId}" />
				<input type="hidden" name="productCost" id="productCost" value="${product.productCost}" />
				<input type="hidden" name="shelfTuangouStatus" id="shelfTuangouStatus" value="${shelfTuangou.status}" />
	<c-rt:choose>
		<c-rt:when test="${approveTuangou eq 'Y'}">
			<yaodian100:checkPermission permissions="OTHER_TUANGOUMANAGER">
				<input type="button" name="approveCancelBtn" id="approveCancelBtn" value="不同意申请" />
				<input type="button" name="approveOKBtn" id="approveOKBtn" value="同意申请" />
			</yaodian100:checkPermission>
		</c-rt:when>
		<c-rt:otherwise>
			<input type="button" name="submitBtn" id="submitBtn" value="储存" />
		</c-rt:otherwise>
	</c-rt:choose>
			</td>
		</tr>
	</table>
</s:form>
<br />
<p>售价记录</p>
<table class="tb-1" width="100%">
	<thead>
		<tr>
			<th>上架类别</th>
			<th>日期起</th>
			<th>日期迄</th>
			<th>小标</th>
			<th>售价</th>
			<th>申请人</th>
			<th>申请状态</th>
			<th>申请时间</th>
			<th>异动人</th>
			<th>异动时间</th>
		</tr>
	</thead>
	<tbody>
	<c-rt:forEach items="${shelfTuangouHistoryList}" var="shelfTuangou">
		<tr>
			<td>
				<c:if test="${shelfTuangou.salesType eq '1'}">一般</c:if>
				<c:if test="${shelfTuangou.salesType eq '2'}">抽奖</c:if>
			</td>
			<td><fmt-rt:formatDate value="${shelfTuangou['START_DATE']}" pattern="yyyy-MM-dd HH:mm" /></td>
			<td><fmt-rt:formatDate value="${shelfTuangou['END_DATE']}" pattern="yyyy-MM-dd HH:mm" /></td>
			<td>${shelfTuangou['PROMOTE_NAME']}</td>
			<td><fmt-rt:formatNumber value="${shelfTuangou['PRICE']}" pattern="######0.0" /></td>
			<td>${shelfTuangou['CREATE_USER']}</td>
			<td>${shelfTuangouStatusMenu.options[shelfTuangou['STATUS']].name}</td>
			<td><fmt-rt:formatDate value="${shelfTuangou['CREATE_DATE']}" pattern="yyyy-MM-dd HH:mm" /></td>
			<td>${shelfTuangou['MODIFY_USER']}</td>
			<td><fmt-rt:formatDate value="${shelfTuangou['MODIFY_DATE']}" pattern="yyyy-MM-dd HH:mm" /></td>
		</tr>
	</c-rt:forEach>
	</tbody>
</table>